package jaxb.entity;

import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@XmlAccessorOrder
public class Userinfo implements Serializable {

    private static final long serialVersionUID = 7870351249722416047L;

    /**
     * XmlTransient[指定属性不映射为XML元素]
     */
    @XmlTransient
    private Long id;

    private String name;

    private String address;

    private String job;

    @XmlElementWrapper(name = "overinfos")
    @XmlElements(value = { @XmlElement(name = "overinfo", type = Overinfo.class) })
    private List<Overinfo> overinfos;

    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public String getJob() {
        return job;
    }
    public void setJob(String job) {
        this.job = job;
    }
    public List<Overinfo> getOverinfos() {
        return overinfos;
    }
    public void setOverinfos(List<Overinfo> overinfos) {
        this.overinfos = overinfos;
    }

}
